package com.one.common.common.order;

import com.google.gson.Gson;
import com.one.common.utils.StringUtils;
import com.one.common.view.multitytype.adapter.BaseItem;

/**
 * creator: zhulunjun
 * time:    2018/8/9
 * describe:
 */
public class MaterialItem extends BaseItem {
    private int material_id;//
    private String order_id;//订单id
    private String order_material_id;
    private String material_name;//材料名称
    private String material_price;
    private String material_count;


    public MaterialItem(String material_name, String price, String material_count) {
        this.material_name = material_name;
        this.material_price = price;
        this.material_count = material_count;
    }

    public String getOrder_material_id() {
        return order_material_id;
    }

    public void setOrder_material_id(String order_material_id) {
        this.order_material_id = order_material_id;
    }

    public String getMaterial_price() {
        return material_price;
    }

    public void setMaterial_price(String material_price) {
        this.material_price = material_price;
    }

    public String getOrder_id() {
        return order_id;
    }

    public void setOrder_id(String order_id) {
        this.order_id = order_id;
    }

    public String getMaterial_count() {
        return material_count;
    }

    public void setMaterial_count(String material_count) {
        this.material_count = material_count;
    }

    public MaterialItem(String material_name, String price) {
        this.material_name = material_name;
        this.material_price = price;
    }

    public MaterialItem() {
    }

    public String toGson(){
        return new Gson().toJson(this);
    }

    public int getMaterial_id() {
        return material_id;
    }

    public void setMaterial_id(int material_id) {
        this.material_id = material_id;
    }

    public String getMaterial_name() {
        return material_name;
    }

    public void setMaterial_name(String material_name) {
        this.material_name = material_name;
    }

    public double getPrice() {
        return StringUtils.getDoubleToString(material_price);
    }

    public void setPrice(String price) {
        this.material_price = price;
    }

    public String getName() {
        return material_name;
    }

    public void setName(String name) {
        this.material_name = name;
    }
}
